<?php
class SearchBox extends CWidget {
    public $words;
	public $word;

	public function init() {
        $this->words = array(
			'强迫',
			'抑郁',
			'社交恐惧',
			'危机干预',
			'婚姻',
			'压力',
			'失眠',
			'焦虑',
			'学业'
        );
		$this->word = $this->words[array_rand($this->words)];
	}

	public function run() {
		$this->renderContent();
	}

	public function renderContent() {
		$this->render('search-box', array(
				'word' => $this->word
			)
		);
	}
}